<div class="modal-header">
    <h4 class="modal-title">新增组织</h4>
</div>
<div class="modal-body">
    <form novalidate class="form system-form-cont" name="orgForm">
        <div class="form-group height-60">
            <label for="orgName">组织名称<span class="require"></span></label>
            <input type="text" name="orgName" class="form-control" ng-model="vm.data.orgName" ng-blur="vm.checkValid(orgForm.orgName)" ng-model-options="{debounce:250}" ng-keyup="vm.checkSame()" ng-class="{'error':orgForm.orgName.$invalid && !orgForm.orgName.$pristine}" id="orgName" required placeholder="机构名称" />
            <span class="error" ng-show="orgForm.orgName.$invalid && !orgForm.orgName.$pristine">机构名称不能为空</span>
        </div>
        <div class="form-group height-60">
            <label for="orgCode">组织编码<span class="require"></span></label>
            <input type="text" name="orgCode" class="form-control" ng-model="vm.data.orgCode" ng-blur="vm.checkValid(orgForm.orgCode)" ng-class="{'error':orgForm.orgCode.$invalid && !orgForm.orgCode.$pristine}" id="orgCode" required placeholder="组织编码" />
            <span class="error" ng-show="orgForm.orgCode.$invalid && !orgForm.orgCode.$pristine">组织编码不能为空</span>
        </div>
        <div class="form-group height-60">
            <region-area form-name="orgForm" ng-model="vm.data.commonRegionId"></region-area>
        </div>
        <div class="form-group height-60">
            <label for="statusCd">组织状态<span class="require"></span></label>
            <select name="statusCd" ng-model="vm.data.statusCd" ng-class="{'error':orgForm.statusCd.$invalid && !orgForm.statusCd.$pristine}" ng-options="k as v for (k, v) in vm.status" id="statusCd" required class="form-control" >
                <option value="">请选组织状态</option>
            </select>
            <span class="error" ng-show="orgForm.statusCd.$invalid && !orgForm.statusCd.$pristine">组织状态不能为空</span>
        </div>
    </form>
</div>
<div class="modal-footer">
    <button type="button" class="btn btn-primary" ng-disabled="orgForm.$invalid || vm.isSame" ng-click="vm.save()"><span ng-show="vm.submitting"><i class="fa fa-spinner fa-spin"></i></span>保存</button>
    <button ng-click="vm.cancel()" type="button" class="btn btn-default cancel">取消</button>
</div>
